package com.zhoushihao.class0812;

public class Card {
    public String suit;
    public int rank;

    public Card(String suit, int rank) {
        this.suit = suit;
        this.rank = rank;
    }

    @Override
    public String toString() {
        String newRnk = "" + this.rank;
        switch(this.rank) {
            case 14:{
                newRnk = "A";
                break;
            }
            case 11:{
                newRnk = "J";
                break;
            }
            case 12:{
                newRnk = "Q";
                break;
            }
            case 13:{
                newRnk = "K";
                break;
            }
            default:{
                break;
            }
        }
        return suit + newRnk;
    }
}
